package com.hfy.user.config;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.socket.server.standard.ServerEndpointExporter;

/**
 * @ author 韩
 * time: 2024/10/7 0:32
 */

@Configuration
public class WebSocketConfig {

    @Bean
    // 注入ServerEndpointExporter bean 对象，自动注册使用了@ServerEndpoint注解的bean
    public ServerEndpointExporter serverEndpointExporter() {
        return new ServerEndpointExporter();
    }

}
